import Vue from 'vue'
import Router from 'vue-router'
// import Home from '@/pages/home/home'
// import City from '@/pages/City/City'
// import detail from '@/pages/detail/detail'
// import login from '@/pages/login/login'
// import search from '@/pages/search/search'
Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'Home',
    component: ()=>import("@/pages/home/home")
  }, {
    path: '/City',
    name: 'City',
    component: ()=>import("@/pages/City/City")
  }, {
    path: '/detail/:id',
    name: 'detail',
    component: ()=>import("@/pages/detail/detail")
  }, {
    path: '/login',
    name: 'login',
    component: ()=>import("@/pages/login/login")
  }, {
    path: '/search',
    name: 'search',
    component: ()=>import("@/pages/search/search")
  }],
  scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
  }
})
